package com.w2cx.selenium.page;

import com.w2cx.selenium.base.DriverBase;
import com.w2cx.selenium.util.Locator;
import org.openqa.selenium.WebElement;

import java.util.List;

public class InformationReview extends BasePage {

    DriverBase driver;
    public InformationReview(DriverBase driver){
        super(driver);
    }

    //获取“内容审核”菜单
    public WebElement getContentReviewMenu(){
        List<WebElement> list = elements(Locator.getByLocator("firstMenuList"));
        WebElement element = list.get(4);
        System.out.println("找到元素:"+element.getText());
        return element;
    }

    //获取“资讯审核”菜单
    public WebElement getInformationReviewMenu(){
        WebElement element = element(Locator.getByLocator("informationReviewMenu"));
        System.out.println("找到元素:"+element.getText());
        return element;
    }


    //获取第一条"去审核"链接
    public WebElement getToReviewLink(){
        WebElement element = element(Locator.getByLocator("toReviewBtn"));
        return element;
    }

    //获取“审核”按钮
    public WebElement getReviewBtn(){
        WebElement element = element(Locator.getByLocator("informationReviewBtn"));
        return element;
    }


    //获取第一条资讯id
    public WebElement getFirstInforId(){
        WebElement element = element(Locator.getByLocator("firstInformationId"));
        return element;

    }


    //
    public List<WebElement> getInformationList(){
        List<WebElement> list = elements(Locator.getByLocator("informationList"));
        return list;
    }


}
